/**
* @file binarytohex.h
* @brief binary to hex macro define
* @details global define
* @author huangbin
* @version V1.0.0
* @date 2025-04-20
* @copyright All documents are copyrighted by Shenzhen Xinlongwei Technology Co., LTD.
*            They may not be used for commercial purposes without permission
*/

#ifndef _BINARYTOHEX_H_
#define _BINARYTOHEX_H_

#ifdef __cplusplus
 extern "C" {
#endif /* __cplusplus */
/////////////////////////debug configuration////////////////////////////////

#define 	BINTOHEX16(h,l)	((uint16_t)(((uint16_t)(h) << 8) | (uint16_t)(l)))

#define     B00000000           0X00           
#define     B00000001           0X01           
#define     B00000010           0X02           
#define     B00000011           0X03           
#define     B00000100           0X04           
#define     B00000101           0X05           
#define     B00000110           0X06           
#define     B00000111           0X07           
#define     B00001000           0X08           
#define     B00001001           0X09           
#define     B00001010           0X0a           
#define     B00001011           0X0b           
#define     B00001100           0X0c           
#define     B00001101           0X0d           
#define     B00001110           0X0e           
#define     B00001111           0X0f           
#define     B00010000           0X10          
#define     B00010001           0X11          
#define     B00010010           0X12          
#define     B00010011           0X13          
#define     B00010100           0X14          
#define     B00010101           0X15          
#define     B00010110           0X16          
#define     B00010111           0X17          
#define     B00011000           0X18          
#define     B00011001           0X19          
#define     B00011010           0X1a          
#define     B00011011           0X1b          
#define     B00011100           0X1c          
#define     B00011101           0X1d          
#define     B00011110           0X1e          
#define     B00011111           0X1f          
#define     B00100000           0X20          
#define     B00100001           0X21          
#define     B00100010           0X22          
#define     B00100011           0X23          
#define     B00100100           0X24          
#define     B00100101           0X25          
#define     B00100110           0X26          
#define     B00100111           0X27          
#define     B00101000           0X28          
#define     B00101001           0X29          
#define     B00101010           0X2a          
#define     B00101011           0X2b          
#define     B00101100           0X2c          
#define     B00101101           0X2d          
#define     B00101110           0X2e          
#define     B00101111           0X2f          
#define     B00110000           0X30          
#define     B00110001           0X31          
#define     B00110010           0X32          
#define     B00110011           0X33          
#define     B00110100           0X34          
#define     B00110101           0X35          
#define     B00110110           0X36          
#define     B00110111           0X37          
#define     B00111000           0X38          
#define     B00111001           0X39          
#define     B00111010           0X3a          
#define     B00111011           0X3b          
#define     B00111100           0X3c          
#define     B00111101           0X3d          
#define     B00111110           0X3e          
#define     B00111111           0X3f          
#define     B01000000           0X40          
#define     B01000001           0X41          
#define     B01000010           0X42          
#define     B01000011           0X43          
#define     B01000100           0X44          
#define     B01000101           0X45          
#define     B01000110           0X46          
#define     B01000111           0X47          
#define     B01001000           0X48          
#define     B01001001           0X49          
#define     B01001010           0X4a          
#define     B01001011           0X4b          
#define     B01001100           0X4c          
#define     B01001101           0X4d          
#define     B01001110           0X4e          
#define     B01001111           0X4f          
#define     B01010000           0X50          
#define     B01010001           0X51          
#define     B01010010           0X52          
#define     B01010011           0X53          
#define     B01010100           0X54          
#define     B01010101           0X55          
#define     B01010110           0X56          
#define     B01010111           0X57          
#define     B01011000           0X58          
#define     B01011001           0X59          
#define     B01011010           0X5a          
#define     B01011011           0X5b          
#define     B01011100           0X5c          
#define     B01011101           0X5d          
#define     B01011110           0X5e          
#define     B01011111           0X5f          
#define     B01100000           0X60          
#define     B01100001           0X61          
#define     B01100010           0X62          
#define     B01100011           0X63          
#define     B01100100           0X64          
#define     B01100101           0X65          
#define     B01100110           0X66          
#define     B01100111           0X67          
#define     B01101000           0X68          
#define     B01101001           0X69          
#define     B01101010           0X6a          
#define     B01101011           0X6b          
#define     B01101100           0X6c          
#define     B01101101           0X6d          
#define     B01101110           0X6e          
#define     B01101111           0X6f          
#define     B01110000           0X70          
#define     B01110001           0X71          
#define     B01110010           0X72          
#define     B01110011           0X73          
#define     B01110100           0X74          
#define     B01110101           0X75          
#define     B01110110           0X76          
#define     B01110111           0X77          
#define     B01111000           0X78          
#define     B01111001           0X79          
#define     B01111010           0X7a          
#define     B01111011           0X7b          
#define     B01111100           0X7c          
#define     B01111101           0X7d          
#define     B01111110           0X7e          
#define     B01111111           0X7f          
#define     B10000000           0X80          
#define     B10000001           0X81          
#define     B10000010           0X82          
#define     B10000011           0X83          
#define     B10000100           0X84          
#define     B10000101           0X85          
#define     B10000110           0X86          
#define     B10000111           0X87          
#define     B10001000           0X88          
#define     B10001001           0X89          
#define     B10001010           0X8a          
#define     B10001011           0X8b          
#define     B10001100           0X8c          
#define     B10001101           0X8d          
#define     B10001110           0X8e          
#define     B10001111           0X8f          
#define     B10010000           0X90          
#define     B10010001           0X91          
#define     B10010010           0X92          
#define     B10010011           0X93          
#define     B10010100           0X94          
#define     B10010101           0X95          
#define     B10010110           0X96          
#define     B10010111           0X97          
#define     B10011000           0X98          
#define     B10011001           0X99          
#define     B10011010           0X9a          
#define     B10011011           0X9b          
#define     B10011100           0X9c          
#define     B10011101           0X9d          
#define     B10011110           0X9e          
#define     B10011111           0X9f          
#define     B10100000           0Xa0          
#define     B10100001           0Xa1          
#define     B10100010           0Xa2          
#define     B10100011           0Xa3          
#define     B10100100           0Xa4          
#define     B10100101           0Xa5          
#define     B10100110           0Xa6          
#define     B10100111           0Xa7          
#define     B10101000           0Xa8          
#define     B10101001           0Xa9          
#define     B10101010           0Xaa          
#define     B10101011           0Xab          
#define     B10101100           0Xac          
#define     B10101101           0Xad          
#define     B10101110           0Xae          
#define     B10101111           0Xaf          
#define     B10110000           0Xb0          
#define     B10110001           0Xb1          
#define     B10110010           0Xb2          
#define     B10110011           0Xb3          
#define     B10110100           0Xb4          
#define     B10110101           0Xb5          
#define     B10110110           0Xb6          
#define     B10110111           0Xb7          
#define     B10111000           0Xb8          
#define     B10111001           0Xb9          
#define     B10111010           0Xba          
#define     B10111011           0Xbb          
#define     B10111100           0Xbc          
#define     B10111101           0Xbd          
#define     B10111110           0Xbe          
#define     B10111111           0Xbf          
#define     B11000000           0Xc0          
#define     B11000001           0Xc1          
#define     B11000010           0Xc2          
#define     B11000011           0Xc3          
#define     B11000100           0Xc4          
#define     B11000101           0Xc5          
#define     B11000110           0Xc6          
#define     B11000111           0Xc7          
#define     B11001000           0Xc8          
#define     B11001001           0Xc9          
#define     B11001010           0Xca          
#define     B11001011           0Xcb          
#define     B11001100           0Xcc          
#define     B11001101           0Xcd          
#define     B11001110           0Xce          
#define     B11001111           0Xcf          
#define     B11010000           0Xd0          
#define     B11010001           0Xd1          
#define     B11010010           0Xd2          
#define     B11010011           0Xd3          
#define     B11010100           0Xd4          
#define     B11010101           0Xd5          
#define     B11010110           0Xd6          
#define     B11010111           0Xd7          
#define     B11011000           0Xd8          
#define     B11011001           0Xd9          
#define     B11011010           0Xda          
#define     B11011011           0Xdb          
#define     B11011100           0Xdc          
#define     B11011101           0Xdd          
#define     B11011110           0Xde          
#define     B11011111           0Xdf          
#define     B11100000           0Xe0          
#define     B11100001           0Xe1          
#define     B11100010           0Xe2          
#define     B11100011           0Xe3          
#define     B11100100           0Xe4          
#define     B11100101           0Xe5          
#define     B11100110           0Xe6          
#define     B11100111           0Xe7          
#define     B11101000           0Xe8          
#define     B11101001           0Xe9          
#define     B11101010           0Xea          
#define     B11101011           0Xeb          
#define     B11101100           0Xec          
#define     B11101101           0Xed          
#define     B11101110           0Xee          
#define     B11101111           0Xef          
#define     B11110000           0Xf0          
#define     B11110001           0Xf1          
#define     B11110010           0Xf2          
#define     B11110011           0Xf3          
#define     B11110100           0Xf4          
#define     B11110101           0Xf5          
#define     B11110110           0Xf6          
#define     B11110111           0Xf7          
#define     B11111000           0Xf8          
#define     B11111001           0Xf9          
#define     B11111010           0Xfa          
#define     B11111011           0Xfb          
#define     B11111100           0Xfc          
#define     B11111101           0Xfd          
#define     B11111110           0Xfe          
#define     B11111111           0Xff        

//////////////////////////////////////////////////////////////////////////
#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif
/************************END OF FILE*************************************/

